// Copyright 2019-2025 PureStake Inc.
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam.  If not, see <http://www.gnu.org/licenses/>.


//! Autogenerated weights for pallet_moonbeam_orbiters
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-04-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `benchmarker`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024

// Executed Command:
// ./target/release/moonbeam
// benchmark
// pallet
// --execution=wasm
// --wasm-execution=compiled
// --pallet
// *
// --extrinsic
// *
// --steps
// 50
// --repeat
// 20
// --template=./benchmarking/frame-weight-template.hbs
// --json-file
// raw.json
// --output
// weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weight functions needed for pallet_moonbeam_orbiters.
pub trait WeightInfo {
	fn collator_add_orbiter() -> Weight;
	fn collator_remove_orbiter() -> Weight;
	fn orbiter_leave_collator_pool() -> Weight;
	fn orbiter_register() -> Weight;
	fn orbiter_unregister(n: u32, ) -> Weight;
	fn add_collator() -> Weight;
	fn remove_collator() -> Weight;
	fn on_initialize(x: u32, ) -> Weight;
	fn distribute_rewards() -> Weight;
	fn on_new_round() -> Weight;
}

/// Weights for pallet_moonbeam_orbiters using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
	/// Storage: MoonbeamOrbiters CollatorsPool (r:1 w:1)
	/// Proof Skipped: MoonbeamOrbiters CollatorsPool (max_values: None, max_size: None, mode: Measured)
	/// Storage: Balances Reserves (r:1 w:0)
	/// Proof: Balances Reserves (max_values: None, max_size: Some(1037), added: 3512, mode: MaxEncodedLen)
	fn collator_add_orbiter() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `524`
		//  Estimated: `8491`
		// Minimum execution time: 31_294_000 picoseconds.
		Weight::from_parts(31_664_000, 8491)
			.saturating_add(T::DbWeight::get().reads(2_u64))
			.saturating_add(T::DbWeight::get().writes(1_u64))
	}
	/// Storage: MoonbeamOrbiters CollatorsPool (r:1 w:1)
	/// Proof Skipped: MoonbeamOrbiters CollatorsPool (max_values: None, max_size: None, mode: Measured)
	fn collator_remove_orbiter() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `328`
		//  Estimated: `3793`
		// Minimum execution time: 25_918_000 picoseconds.
		Weight::from_parts(26_844_000, 3793)
			.saturating_add(T::DbWeight::get().reads(1_u64))
			.saturating_add(T::DbWeight::get().writes(1_u64))
	}
	/// Storage: MoonbeamOrbiters CollatorsPool (r:1 w:1)
	/// Proof Skipped: MoonbeamOrbiters CollatorsPool (max_values: None, max_size: None, mode: Measured)
	fn orbiter_leave_collator_pool() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `328`
		//  Estimated: `3793`
		// Minimum execution time: 26_301_000 picoseconds.
		Weight::from_parts(26_924_000, 3793)
			.saturating_add(T::DbWeight::get().reads(1_u64))
			.saturating_add(T::DbWeight::get().writes(1_u64))
	}
	/// Storage: MoonbeamOrbiters MinOrbiterDeposit (r:1 w:0)
	/// Proof Skipped: MoonbeamOrbiters MinOrbiterDeposit (max_values: Some(1), max_size: None, mode: Measured)
	/// Storage: Balances Reserves (r:1 w:1)
	/// Proof: Balances Reserves (max_values: None, max_size: Some(1037), added: 3512, mode: MaxEncodedLen)
	/// Storage: System Account (r:1 w:1)
	/// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen)
	/// Storage: MoonbeamOrbiters RegisteredOrbiter (r:0 w:1)
	/// Proof Skipped: MoonbeamOrbiters RegisteredOrbiter (max_values: None, max_size: None, mode: Measured)
	fn orbiter_register() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `244`
		//  Estimated: `10056`
		// Minimum execution time: 40_518_000 picoseconds.
		Weight::from_parts(40_919_000, 10056)
			.saturating_add(T::DbWeight::get().reads(3_u64))
			.saturating_add(T::DbWeight::get().writes(3_u64))
	}
	/// Storage: MoonbeamOrbiters CounterForCollatorsPool (r:1 w:0)
	/// Proof: MoonbeamOrbiters CounterForCollatorsPool (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
	/// Storage: MoonbeamOrbiters CollatorsPool (r:101 w:0)
	/// Proof Skipped: MoonbeamOrbiters CollatorsPool (max_values: None, max_size: None, mode: Measured)
	/// Storage: Balances Reserves (r:1 w:1)
	/// Proof: Balances Reserves (max_values: None, max_size: Some(1037), added: 3512, mode: MaxEncodedLen)
	/// Storage: System Account (r:1 w:1)
	/// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen)
	/// Storage: MoonbeamOrbiters RegisteredOrbiter (r:0 w:1)
	/// Proof Skipped: MoonbeamOrbiters RegisteredOrbiter (max_values: None, max_size: None, mode: Measured)
	/// The range of component `n` is `[0, 100]`.
	fn orbiter_unregister(n: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `353 + n * (48 ±0)`
		//  Estimated: `13741 + n * (2573 ±0)`
		// Minimum execution time: 47_306_000 picoseconds.
		Weight::from_parts(54_887_856, 13741)
			// Standard Error: 4_642
			.saturating_add(Weight::from_parts(3_748_717, 0).saturating_mul(n.into()))
			.saturating_add(T::DbWeight::get().reads(4_u64))
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
			.saturating_add(T::DbWeight::get().writes(3_u64))
			.saturating_add(Weight::from_parts(0, 2573).saturating_mul(n.into()))
	}
	/// Storage: MoonbeamOrbiters CollatorsPool (r:1 w:1)
	/// Proof Skipped: MoonbeamOrbiters CollatorsPool (max_values: None, max_size: None, mode: Measured)
	/// Storage: MoonbeamOrbiters CounterForCollatorsPool (r:1 w:1)
	/// Proof: MoonbeamOrbiters CounterForCollatorsPool (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
	fn add_collator() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `44`
		//  Estimated: `4998`
		// Minimum execution time: 16_308_000 picoseconds.
		Weight::from_parts(16_486_000, 4998)
			.saturating_add(T::DbWeight::get().reads(2_u64))
			.saturating_add(T::DbWeight::get().writes(2_u64))
	}
	/// Storage: MoonbeamOrbiters CollatorsPool (r:1 w:1)
	/// Proof Skipped: MoonbeamOrbiters CollatorsPool (max_values: None, max_size: None, mode: Measured)
	/// Storage: MoonbeamOrbiters CounterForCollatorsPool (r:1 w:1)
	/// Proof: MoonbeamOrbiters CounterForCollatorsPool (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
	/// Storage: MoonbeamOrbiters AccountLookupOverride (r:0 w:9)
	/// Proof Skipped: MoonbeamOrbiters AccountLookupOverride (max_values: None, max_size: None, mode: Measured)
	fn remove_collator() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `328`
		//  Estimated: `5610`
		// Minimum execution time: 31_542_000 picoseconds.
		Weight::from_parts(31_858_000, 5610)
			.saturating_add(T::DbWeight::get().reads(2_u64))
			.saturating_add(T::DbWeight::get().writes(11_u64))
	}
	/// Storage: MoonbeamOrbiters CurrentRound (r:1 w:0)
	/// Proof Skipped: MoonbeamOrbiters CurrentRound (max_values: Some(1), max_size: None, mode: Measured)
	/// Storage: MoonbeamOrbiters OrbiterPerRound (r:100 w:100)
	/// Proof Skipped: MoonbeamOrbiters OrbiterPerRound (max_values: None, max_size: None, mode: Measured)
	/// The range of component `x` is `[0, 100]`.
	fn on_initialize(x: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `102 + x * (61 ±0)`
		//  Estimated: `2680 + x * (2599 ±0)`
		// Minimum execution time: 9_606_000 picoseconds.
		Weight::from_parts(11_256_743, 2680)
			// Standard Error: 1_440
			.saturating_add(Weight::from_parts(900_084, 0).saturating_mul(x.into()))
			.saturating_add(T::DbWeight::get().reads(1_u64))
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into())))
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(x.into())))
			.saturating_add(Weight::from_parts(0, 2599).saturating_mul(x.into()))
	}
	/// Storage: MoonbeamOrbiters OrbiterPerRound (r:1 w:1)
	/// Proof Skipped: MoonbeamOrbiters OrbiterPerRound (max_values: None, max_size: None, mode: Measured)
	/// Storage: System Account (r:1 w:1)
	/// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen)
	fn distribute_rewards() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `260`
		//  Estimated: `7306`
		// Minimum execution time: 30_886_000 picoseconds.
		Weight::from_parts(31_289_000, 7306)
			.saturating_add(T::DbWeight::get().reads(2_u64))
			.saturating_add(T::DbWeight::get().writes(2_u64))
	}
	/// Storage: MoonbeamOrbiters ForceRotation (r:1 w:1)
	/// Proof Skipped: MoonbeamOrbiters ForceRotation (max_values: Some(1), max_size: None, mode: Measured)
	/// Storage: MoonbeamOrbiters CollatorsPool (r:2 w:1)
	/// Proof Skipped: MoonbeamOrbiters CollatorsPool (max_values: None, max_size: None, mode: Measured)
	/// Storage: MoonbeamOrbiters OrbiterPerRound (r:0 w:3)
	/// Proof Skipped: MoonbeamOrbiters OrbiterPerRound (max_values: None, max_size: None, mode: Measured)
	/// Storage: MoonbeamOrbiters AccountLookupOverride (r:0 w:3)
	/// Proof Skipped: MoonbeamOrbiters AccountLookupOverride (max_values: None, max_size: None, mode: Measured)
	/// Storage: MoonbeamOrbiters CurrentRound (r:0 w:1)
	/// Proof Skipped: MoonbeamOrbiters CurrentRound (max_values: Some(1), max_size: None, mode: Measured)
	fn on_new_round() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `218`
		//  Estimated: `8515`
		// Minimum execution time: 40_065_000 picoseconds.
		Weight::from_parts(40_509_000, 8515)
			.saturating_add(T::DbWeight::get().reads(3_u64))
			.saturating_add(T::DbWeight::get().writes(9_u64))
	}
}

// For backwards compatibility and tests
impl WeightInfo for () {
	/// Storage: MoonbeamOrbiters CollatorsPool (r:1 w:1)
	/// Proof Skipped: MoonbeamOrbiters CollatorsPool (max_values: None, max_size: None, mode: Measured)
	/// Storage: Balances Reserves (r:1 w:0)
	/// Proof: Balances Reserves (max_values: None, max_size: Some(1037), added: 3512, mode: MaxEncodedLen)
	fn collator_add_orbiter() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `524`
		//  Estimated: `8491`
		// Minimum execution time: 31_294_000 picoseconds.
		Weight::from_parts(31_664_000, 8491)
			.saturating_add(RocksDbWeight::get().reads(2_u64))
			.saturating_add(RocksDbWeight::get().writes(1_u64))
	}
	/// Storage: MoonbeamOrbiters CollatorsPool (r:1 w:1)
	/// Proof Skipped: MoonbeamOrbiters CollatorsPool (max_values: None, max_size: None, mode: Measured)
	fn collator_remove_orbiter() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `328`
		//  Estimated: `3793`
		// Minimum execution time: 25_918_000 picoseconds.
		Weight::from_parts(26_844_000, 3793)
			.saturating_add(RocksDbWeight::get().reads(1_u64))
			.saturating_add(RocksDbWeight::get().writes(1_u64))
	}
	/// Storage: MoonbeamOrbiters CollatorsPool (r:1 w:1)
	/// Proof Skipped: MoonbeamOrbiters CollatorsPool (max_values: None, max_size: None, mode: Measured)
	fn orbiter_leave_collator_pool() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `328`
		//  Estimated: `3793`
		// Minimum execution time: 26_301_000 picoseconds.
		Weight::from_parts(26_924_000, 3793)
			.saturating_add(RocksDbWeight::get().reads(1_u64))
			.saturating_add(RocksDbWeight::get().writes(1_u64))
	}
	/// Storage: MoonbeamOrbiters MinOrbiterDeposit (r:1 w:0)
	/// Proof Skipped: MoonbeamOrbiters MinOrbiterDeposit (max_values: Some(1), max_size: None, mode: Measured)
	/// Storage: Balances Reserves (r:1 w:1)
	/// Proof: Balances Reserves (max_values: None, max_size: Some(1037), added: 3512, mode: MaxEncodedLen)
	/// Storage: System Account (r:1 w:1)
	/// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen)
	/// Storage: MoonbeamOrbiters RegisteredOrbiter (r:0 w:1)
	/// Proof Skipped: MoonbeamOrbiters RegisteredOrbiter (max_values: None, max_size: None, mode: Measured)
	fn orbiter_register() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `244`
		//  Estimated: `10056`
		// Minimum execution time: 40_518_000 picoseconds.
		Weight::from_parts(40_919_000, 10056)
			.saturating_add(RocksDbWeight::get().reads(3_u64))
			.saturating_add(RocksDbWeight::get().writes(3_u64))
	}
	/// Storage: MoonbeamOrbiters CounterForCollatorsPool (r:1 w:0)
	/// Proof: MoonbeamOrbiters CounterForCollatorsPool (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
	/// Storage: MoonbeamOrbiters CollatorsPool (r:101 w:0)
	/// Proof Skipped: MoonbeamOrbiters CollatorsPool (max_values: None, max_size: None, mode: Measured)
	/// Storage: Balances Reserves (r:1 w:1)
	/// Proof: Balances Reserves (max_values: None, max_size: Some(1037), added: 3512, mode: MaxEncodedLen)
	/// Storage: System Account (r:1 w:1)
	/// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen)
	/// Storage: MoonbeamOrbiters RegisteredOrbiter (r:0 w:1)
	/// Proof Skipped: MoonbeamOrbiters RegisteredOrbiter (max_values: None, max_size: None, mode: Measured)
	/// The range of component `n` is `[0, 100]`.
	fn orbiter_unregister(n: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `353 + n * (48 ±0)`
		//  Estimated: `13741 + n * (2573 ±0)`
		// Minimum execution time: 47_306_000 picoseconds.
		Weight::from_parts(54_887_856, 13741)
			// Standard Error: 4_642
			.saturating_add(Weight::from_parts(3_748_717, 0).saturating_mul(n.into()))
			.saturating_add(RocksDbWeight::get().reads(4_u64))
			.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into())))
			.saturating_add(RocksDbWeight::get().writes(3_u64))
			.saturating_add(Weight::from_parts(0, 2573).saturating_mul(n.into()))
	}
	/// Storage: MoonbeamOrbiters CollatorsPool (r:1 w:1)
	/// Proof Skipped: MoonbeamOrbiters CollatorsPool (max_values: None, max_size: None, mode: Measured)
	/// Storage: MoonbeamOrbiters CounterForCollatorsPool (r:1 w:1)
	/// Proof: MoonbeamOrbiters CounterForCollatorsPool (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
	fn add_collator() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `44`
		//  Estimated: `4998`
		// Minimum execution time: 16_308_000 picoseconds.
		Weight::from_parts(16_486_000, 4998)
			.saturating_add(RocksDbWeight::get().reads(2_u64))
			.saturating_add(RocksDbWeight::get().writes(2_u64))
	}
	/// Storage: MoonbeamOrbiters CollatorsPool (r:1 w:1)
	/// Proof Skipped: MoonbeamOrbiters CollatorsPool (max_values: None, max_size: None, mode: Measured)
	/// Storage: MoonbeamOrbiters CounterForCollatorsPool (r:1 w:1)
	/// Proof: MoonbeamOrbiters CounterForCollatorsPool (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
	/// Storage: MoonbeamOrbiters AccountLookupOverride (r:0 w:9)
	/// Proof Skipped: MoonbeamOrbiters AccountLookupOverride (max_values: None, max_size: None, mode: Measured)
	fn remove_collator() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `328`
		//  Estimated: `5610`
		// Minimum execution time: 31_542_000 picoseconds.
		Weight::from_parts(31_858_000, 5610)
			.saturating_add(RocksDbWeight::get().reads(2_u64))
			.saturating_add(RocksDbWeight::get().writes(11_u64))
	}
	/// Storage: MoonbeamOrbiters CurrentRound (r:1 w:0)
	/// Proof Skipped: MoonbeamOrbiters CurrentRound (max_values: Some(1), max_size: None, mode: Measured)
	/// Storage: MoonbeamOrbiters OrbiterPerRound (r:100 w:100)
	/// Proof Skipped: MoonbeamOrbiters OrbiterPerRound (max_values: None, max_size: None, mode: Measured)
	/// The range of component `x` is `[0, 100]`.
	fn on_initialize(x: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `102 + x * (61 ±0)`
		//  Estimated: `2680 + x * (2599 ±0)`
		// Minimum execution time: 9_606_000 picoseconds.
		Weight::from_parts(11_256_743, 2680)
			// Standard Error: 1_440
			.saturating_add(Weight::from_parts(900_084, 0).saturating_mul(x.into()))
			.saturating_add(RocksDbWeight::get().reads(1_u64))
			.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(x.into())))
			.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(x.into())))
			.saturating_add(Weight::from_parts(0, 2599).saturating_mul(x.into()))
	}
	/// Storage: MoonbeamOrbiters OrbiterPerRound (r:1 w:1)
	/// Proof Skipped: MoonbeamOrbiters OrbiterPerRound (max_values: None, max_size: None, mode: Measured)
	/// Storage: System Account (r:1 w:1)
	/// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen)
	fn distribute_rewards() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `260`
		//  Estimated: `7306`
		// Minimum execution time: 30_886_000 picoseconds.
		Weight::from_parts(31_289_000, 7306)
			.saturating_add(RocksDbWeight::get().reads(2_u64))
			.saturating_add(RocksDbWeight::get().writes(2_u64))
	}
	/// Storage: MoonbeamOrbiters ForceRotation (r:1 w:1)
	/// Proof Skipped: MoonbeamOrbiters ForceRotation (max_values: Some(1), max_size: None, mode: Measured)
	/// Storage: MoonbeamOrbiters CollatorsPool (r:2 w:1)
	/// Proof Skipped: MoonbeamOrbiters CollatorsPool (max_values: None, max_size: None, mode: Measured)
	/// Storage: MoonbeamOrbiters OrbiterPerRound (r:0 w:3)
	/// Proof Skipped: MoonbeamOrbiters OrbiterPerRound (max_values: None, max_size: None, mode: Measured)
	/// Storage: MoonbeamOrbiters AccountLookupOverride (r:0 w:3)
	/// Proof Skipped: MoonbeamOrbiters AccountLookupOverride (max_values: None, max_size: None, mode: Measured)
	/// Storage: MoonbeamOrbiters CurrentRound (r:0 w:1)
	/// Proof Skipped: MoonbeamOrbiters CurrentRound (max_values: Some(1), max_size: None, mode: Measured)
	fn on_new_round() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `218`
		//  Estimated: `8515`
		// Minimum execution time: 40_065_000 picoseconds.
		Weight::from_parts(40_509_000, 8515)
			.saturating_add(RocksDbWeight::get().reads(3_u64))
			.saturating_add(RocksDbWeight::get().writes(9_u64))
	}
}